package com.sciencep.pro.common.config;

import java.math.BigDecimal;

@SuppressWarnings("ALL")
public class Constant {

    private Constant() {

    }

    public static final String DATA_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String TIME_ZONE = "GMT+8";
    public static final String QUESTION_TITLE_REMOVE_REG = "</?(img|video)[^>]+>";

    /**
     * 题目和答案中图片匹配字符串
     */
    public static final String QUESTION_TITLE_IMAGE_TAG = "<img";

    public static final String CHARSET_UTF8 = "UTF-8";

    public static final String TOKEN_CACHE_PREFIX = "pro.cache.token.";


    public static final String USERINFO_CACHE_PREFIX = "pro.cache.userid";
    /**
     * redis key：手机验证码
     */
    public static final String MESSAGE_VALID_CODE_PHONE = "pro.message.valid.code.phone.";
    /**
     * redis key：每天限制短信次数
     */
    public static final String MESSAGE_DAY_PHONE_COUNT = "pro.message.day.phone.count.";

    public static final String ADMIN_PASSWORD_PATTERN = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$";

    public static final String GB2312 = "GB2312";

    public static final String ISO_8859_1 = "ISO_8859_1";

    public static final String OTHER0001 = "OTHER0001";

    public static class DefaultVal {
        private DefaultVal() {

        }

        public static final String STR = "";
        public static final BigDecimal DECIMAL = BigDecimal.ZERO;
        public static final Integer INT = 0;
        public static final Boolean BOOL = false;
    }

    public static class Evn {
        private Evn() {

        }

        public static final String TEST = "test";
        public static final String DEV = "dev";
        public static final String QA = "qa";
        public static final String STAGE = "stage";
        public static final String PRODUCT = "product";
    }

    public static class ReviewStatus {
        private ReviewStatus() {

        }

        public static final Integer NO = 0;
        public static final Integer YES = 1;

    }

    public static class ErrorCode {

        private ErrorCode() {

        }

        public static final String SUCCESS = "0000";

        public static final String SYSTEM_ERROR = "1001";

        public static final String VALIDATE_ERROR = "1002";

        public static final String SERVICE_ERROR = "1003";

        public static final String HTTP_MESSAGE_NOT_READABLE_ERROR = "1004";

        public static final String UNAUTHORIZED_ERROR = "1005";

        public static final String HTTP_MESSAGE_NOT_READABLE_MESSAGE = "参数有误";

        public static final String WEB_LOGIN_STUDENT_ERROR = "4001";

        public static final String WEB_LOGIN_TEACHER_NO_CLASS_ERROR = "4002";
    }


    public static class TaskName {
        private TaskName() {

        }

        public static final String DEPT_TASK = "更新部门定时任务";
        public static final String USER_DEPT_TASK = "更新用户和部门关联表定时任务";
        public static final String USER_ROLE_TASK = "更新角色和用户关联表定时任务";
        public static final String USER_RESIGN_TASK = "更新离职员工和类型定时任务";
        public static final String ATTENDANCE_TASK = "更新考勤定时任务";
        public static final String LEAVE_TASK = "更新用户请假信息定时任务";
        public static final String WORK_DAILY_TASK = "更新用户日志信息定时任务";

        public static final String DEPT_TASK_OTHER = "更新外包部门定时任务";
        public static final String USER_DEPT_TASK_OTHER = "更新外包用户和部门关联表定时任务";
        public static final String USER_ROLE_TASK_OTHER = "更新外包角色和用户关联表定时任务";
        public static final String USER_RESIGN_TASK_OTHER = "更新外包离职员工和类型定时任务";
        public static final String ATTENDANCE_TASK_OTHER = "更新外包考勤定时任务";
        public static final String LEAVE_TASK_OTHER = "更新外包用户请假信息定时任务";
        public static final String WORK_DAILY_TASK_OTHER = "更新外包用户日志信息定时任务";
    }

    public static class TaskMessage {
        private TaskMessage() {

        }

        public static final String FAILURE = "失败,请在基础数据管理-数据同步中重新更新！";
        public static final String TASK_FAILURE = "定时任务更新失败";
        public static final String DAILY_LOG_FAILURE = "日志更新异常";
    }


    public static class IsDelete {
        private IsDelete() {

        }

        public static final Integer YES = 1;
        public static final Integer NO = 0;
    }

    public static class ProStatus {

        private ProStatus() {

        }

        public static final Integer FINISH = 4;

        public static final Integer TO_AUDIT = 1;

        public static final Integer AUDIT = 2;

        public static final Integer PROCESSING = 3;

        public static final Integer NOT_PASS = 5;

        public static final Integer NOT_START = 6;
    }


    public static class Schedule {

        private Schedule() {

        }

        public static final double NORMAL = 0.05;
        public static final double LOSE_NORMAL = -0.05;

        public static final double DELAY = 0.2;
        public static final double LOSE_DELAY = -0.2;

        public static final String NORMAL_STATUS = "正常";
        public static final String DELAY_STATUS = "延期";
        public static final String LEAD_STATUS = "超前";
        public static final String SHARPLY_DELAY_STATUS = "大幅度延期";
        public static final String SHARPLY_LEAD_STATUS = "大幅度超前";
    }


    public static class Lock {

        private Lock() {

        }

        public static class LockType {
            private LockType() {

            }

            public static final String JOB = "RedisJobLock";
        }

        public static class LockName {
            private LockName() {

            }

            public static final String HOMEWORK_EXPIRE = "HomeworkExpire";
            public static final String MEMBER_REMOVE = "MemberRemove";
        }
    }

    public static class AppId {
        private AppId() {

        }

        public static final String ADMIN = "pro.admin";
        public static final String WEB = "pro.web";
        public static final String WECHAT = "pro.wechat";
    }


    public static class ProChangeStatus {

        private ProChangeStatus() {

        }

        public static final Integer START = 0;

        public static final Integer OK = 1;

        public static final Integer NO = 1;
    }

    public static class ErrorMessage {

        private ErrorMessage() {

        }

        public static final String DUPLICATE_LESSON_TYPE_ERROR = "重复的课程类别！";
        public static final String TYPE_NAME_ERROR = "研发类型名称重复";
        public static final String TYPE_TYPECODE_ERROR = "项目类型编码重复";
        public static final String NODE_ERROR = "项目节点名称重复";
        public static final String PROCESS_ERROR = "请添加流程节点";
        public static final String PROCESS_REPEAT = "流程节点重复";
        public static final String CONTACT_REPEAT = "分社成员重复";
        public static final String CONTACT_NAME_REPEAT = "分社成员名称不能为空";
        public static final String PROCESS_PROCEED = "该节点在使用中,不可删除";
        public static final String PROCESS_PROCEED_UPDATE = "该节点在使用中,不可编辑";
        public static final String BRANCH_NULL = "分社信息不能为空";
        public static final String BRANCH_REPEAT = "分社名称重复";
        public static final String BRANCH_ID_NULL = "分社ID不能为空";
        public static final String BRANCH_PROCEED = "该分社在使用中,不可删除";
        public static final String BRANCH_PROCESS_ERROR = "请添加分社成员";
        public static final String BRANCH_PROCEED_EDIT = "该分社名称在使用中,不可修改";
        public static final String BRANCH_PROCEED_EDIT_CONTACT = "不能删除正在使用中的分社成员";
        public static final String DING_ERROR = "钉钉服务异常,请联系管理员";

    }

}
